package smarthouse.model;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the electronic database table.
 * 
 */
@Entity
@NamedQuery(name="Electronic.findAll", query="SELECT e FROM Electronic e")
public class Electronic implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int electronicId;

	private int power;

	private String type;

	//bi-directional many-to-one association to Room
	@ManyToOne
	@JoinColumn(name="roomId")
	private Room room;

	/**
	 * Default constructor
	 */
	public Electronic() {
	}

	/**
	 * Getter/Setter
	 * @return
	 */
	public int getElectronicId() {
		return this.electronicId;
	}
	/**
	 * Getter/Setter
	 * @return
	 */
	public void setElectronicId(int electronicId) {
		this.electronicId = electronicId;
	}
	/**
	 * Getter/Setter
	 * @return
	 */
	public int getPower() {
		return this.power;
	}
	/**
	 * Getter/Setter
	 * @return
	 */
	public void setPower(int power) {
		this.power = power;
	}
	/**
	 * Getter/Setter
	 * @return
	 */
	public String getType() {
		return this.type;
	}
	/**
	 * Getter/Setter
	 * @return
	 */
	public void setType(String type) {
		this.type = type;
	}
	/**
	 * Getter/Setter
	 * @return
	 */
	public Room getRoom() {
		return this.room;
	}
	/**
	 * Getter/Setter
	 * @return
	 */
	public void setRoom(Room room) {
		this.room = room;
	}

}